package com.atguigu.vod.Utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * Created by Miracle yaochengwei on 2020/8/27 12:13
 */
//工具类
@Component
public class ConstantVodUtils implements InitializingBean {
    //通过配置文件，读取，id 和密钥
    @Value("LTAI4G8u9psZxi1yj5gyPNiK")  //value注解读取配置文件中内容
    private String keyid;

    @Value("nZrnkazN8gNHKckyi8A86eEfw7meh4")
    private String keysecret;

    public static String ACCESS_KEY_ID;
    public static String ACCESS_KEY_SECRET;
    @Override
    public void afterPropertiesSet() throws Exception {
        ACCESS_KEY_ID = keyid;
        ACCESS_KEY_SECRET = keysecret;
    }
}
